<html>
<head><meta charset="utf-8"><title>Help from trait · general · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/index.html">general</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Help.20from.20trait.html">Help from trait</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="211968155"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Help%20from%20trait/near/211968155" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nelson nunes <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Help.20from.20trait.html#211968155">(Oct 01 2020 at 20:16)</a>:</h4>
<p>Hi all,<br>
I want : get data from database, send it to a mobile app in JSON.</p>
<p>Im using diesel to get this vec: <code>let all: Vec&lt;(Subscription, Event)&gt; =  ...</code><br>
Then <code>all.into()</code> to transform it in a <code>SubscriptionsEventResponse</code><br>
i dont know how to write these things ... i am stucked here:</p>
<p>(Subscription, Event) i dont know how to deal  this tuple, i know how to handle only one struct.. :(</p>
<p>Subscription and Event structs already exists...</p>
<div class="codehilite"><pre><span></span><code>impl From&lt;(Subscription, Event)&gt; for SubscriptionEventResponse {
    fn from(subscription: Subscription) -&gt; Self {
    }
}

impl From&lt;Vec&lt;(Subscription, Event)&gt;&gt; for SubscriptionsEventResponse {
    fn from(subscriptions: Vec&lt;(Subscription, Event)&gt;) -&gt; Self {

    }
}
</code></pre></div>


<p>Nelson</p>



<a name="211987346"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Help%20from%20trait/near/211987346" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Help.20from.20trait.html#211987346">(Oct 01 2020 at 23:11)</a>:</h4>
<p>Please ask this question on <a href="http://users.rust-lang.org">users.rust-lang.org</a>; it is a forum for talking about Rust and getting help</p>



<a name="211987366"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Help%20from%20trait/near/211987366" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Help.20from.20trait.html#211987366">(Oct 01 2020 at 23:11)</a>:</h4>
<p>This chat server is for development of Rust</p>



<a name="211997525"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Help%20from%20trait/near/211997525" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lzutao <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Help.20from.20trait.html#211997525">(Oct 02 2020 at 02:12)</a>:</h4>
<p>it's alright when asking for help here</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>